#include "imagecinecontroller.h"
#include "ui_imagecinecontroller.h"

ImageCineController::ImageCineController(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::ImageCineController)
{
    ui->setupUi(this);

    connect(ui->firstButton, SIGNAL(clicked()), this, SIGNAL(first()));
    connect(ui->prevButton, SIGNAL(clicked()), this, SIGNAL(previous()));
    connect(ui->startButton, SIGNAL(clicked(bool)), this, SIGNAL(startCine(bool)));
    connect(ui->nextButton, SIGNAL(clicked()), this, SIGNAL(next()));
    connect(ui->lastButton, SIGNAL(clicked()), this, SIGNAL(last()));
    connect(ui->fpsSpin, SIGNAL(valueChanged(int)), this, SIGNAL(fpsChanged(int)));
}

ImageCineController::~ImageCineController()
{
    delete ui;
}

void ImageCineController::setStart(bool yes)
{
    ui->startButton->setChecked(yes);
    emit startCine(yes);
}

void ImageCineController::setFps(int fps)
{
    ui->fpsSpin->setValue(fps);
}
